<?php
class InPatientCoreErrorCode {
	const NORMAL = 0;
	const COMMON_ERROR = -1;
	const IN_PATIENT_EXISTED = 1;    
    const IN_PATIENT_COULDNOT_CHECK_OUT = 2;
    const IN_PATIENT_TESTTICKET_DONE = 3;
    const WRONG_ICD10_CODE = 4;
    
    public static function getErrorMess($errCode, $input1=null,$input2=null,$input3=null,$input4 = null) {
    	switch ($errCode) {
    		case InPatientCoreErrorCode::IN_PATIENT_EXISTED:
    			return L10nHelper::_("The patient %s already existed", $input1);
    		break;  
    		case InPatientCoreErrorCode::IN_PATIENT_COULDNOT_CHECK_OUT:
                return L10nHelper::_("Couldnot checkout for patient %s", $input1);
            break;
            case InPatientCoreErrorCode::IN_PATIENT_TESTTICKET_DONE:
                return L10nHelper::_("Not allow to delete the test ticket already has result");
            break;
            case InPatientCoreErrorCode::COMMON_ERROR:
                return L10nHelper::_("Execute task fail");
            break;
            case InPatientCoreErrorCode::WRONG_ICD10_CODE:
            	return L10nHelper::_("Wrong ICD10 code");    		
    		default:
    			;
    		break;
    	}
    	
    } 
}
?>